git=`git --version|awk -F" " '{print $1}'`
echo $git
if [[ "$git" == "git*"  ]];then
echo "当前电脑已经安装git，不服务不再安装git"
else
#安装git
echo y | apt-get install git
fi
git config --global user.name "zxhtom"
git config --global user.email "870775401@qq.com"
git config --global core.editor vim
#生成本地ssh
echo | ssh-keygen -t rsa -C "870775401@qq.com"
#输出公钥
cat /root/.ssh/id_rsa.pub

#=======
# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
# wget https://www.kernel.org/pub/software/scm/git/git-2.8.3.tar.gz
# tar -zxvf git-2.8.3.tar.gz
# cd git-2.8.3
# ./configure prefix=/usr/local/git/
# make && make install
# #设置用户名和密码
# git config --global user.name "zxhtom"
# git config --global user.email "870775401@qq.com"
